{include file='admin/header.html'}

<form class="layui-form" action="" style="margin-left: 15px;">
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">{$tran.basic}</li>
            <li>{$tran.advanced}</li>
            <li>{$tran.other}</li>
        </ul>
        <div class="layui-form layui-tab-content">
            <!-- 基本设置 -->
            <div class="layui-tab-item layui-show">
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.weblogo} Logo</label>
                    <div class="layui-input-inline">
                        <input type="url" name="webLogo" value="{$row.webLogo}" placeholder="" autocomplete="off"
                            class="layui-input upload">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.webname}</label>
                    <div class="layui-input-inline">
                        <input type="text" name="webName" value="{$row.webName}" required lay-verify="required"
                            placeholder="{$tran.input_webname}" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">SEO {$tran.title}</label>
                    <div class="layui-input-block">
                        <input type="text" name="seo_title" value="{$row.seo_title}" placeholder="" autocomplete="off"
                            class="layui-input">
                        <div class="layui-form-mid layui-word-aux characters-count"></div>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">SEO {$tran.suggest}</label>
                    <div class="layui-input-block">
                        <button type="button" class="layui-btn layui-btn-sm layui-btn-primary keywords-suggest baidu">Baidu {$tran.keywords_suggest}</button>
                        <button type="button" class="layui-btn layui-btn-sm layui-btn-primary keywords-suggest google">Google {$tran.keywords_suggest}</button>
                        <i class="layui-icon layui-icon-loading-1 layui-anim layui-anim-rotate layui-anim-loop layui-hide loading"></i>
                    </div>
                    <div class="layui-btn-container suggest-result" style="margin-top: 5px"></div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">SEO {$tran.description}</label>
                    <div class="layui-input-block">
                        <textarea name="seo_description" placeholder=""
                            class="layui-textarea">{$row.seo_description}</textarea>
                        <div class="layui-form-mid layui-word-aux characters-count"></div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.upload_type}</label>
                    <div class="layui-input-inline">
                        <input type="text" name="upload_type" value="{$row.upload_type}" required lay-verify="required"
                            placeholder="" autocomplete="off" class="layui-input">
                    </div>
                    <div class="layui-form-mid layui-word-aux">{$tran.allow_upload_type}</div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.limit_size}</label>
                    <div class="layui-input-inline">
                        <input type="number" name="upload_size" value="{$row.upload_size}" required
                            lay-verify="required|number" placeholder="{$tran.input_limit_size}" autocomplete="off"
                            class="layui-input">
                    </div>
                    <div class="layui-form-mid layui-word-aux">{$tran.unit} KB {$tran.default_max} 2MB</div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.robot_noindex}</label>
                    <div class="layui-input-block">
                        <input type="hidden" name="robot_index" value="0">
                        <input type="checkbox" name="robot_index" value="1" {if $row.robot_index=='1' } checked{/if}
                            lay-skin="switch" lay-text="ON|OFF">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.single_login}</label>
                    <div class="layui-input-block">
                        <input type="hidden" name="alone_login" value="0">
                        <input type="checkbox" name="alone_login" value="1" {if $row.alone_login=='1' } checked{/if}
                            lay-skin="switch" lay-text="ON|OFF">
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">{$tran.copyr_info}</label>
                    <div class="layui-input-block">
                        <textarea name="copyright" placeholder="{$tran.input_copyr_info}" required lay-verify="required"
                            class="layui-textarea">{$row.copyright|escape:html}</textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">ICP {$tran.web_icp}</label>
                    <div class="layui-input-inline">
                        <input type="text" name="icp" value="{$row.icp}" required lay-verify="required"
                            placeholder="{$tran.input} ICP {$tran.web_icp}" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">CDN {$tran.speed}</label>
                    <div class="layui-input-block">
                        <input type="hidden" name="cdn_speed" value="0">
                        <input type="checkbox" name="cdn_speed" value="1" {if $row.cdn_speed=='1' } checked{/if}
                            lay-skin="switch" lay-text="ON|OFF">
                    </div>
                </div>
            </div>
            <!-- 高级设置 -->
            <div class="layui-tab-item">
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.carousel} 1</label>
                    <div class="layui-input-inline">
                        <input type="url" name="slide_image_1" value="{$row.slide_image_1}" placeholder=""
                            autocomplete="off" class="layui-input upload">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.link_address}</label>
                    <div class="layui-input-block">
                        <input type="url" name="slide_url_1" value="{$row.slide_url_1}" placeholder=""
                            autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.carousel} 2</label>
                    <div class="layui-input-inline">
                        <input type="url" name="slide_image_2" value="{$row.slide_image_2}" placeholder=""
                            autocomplete="off" class="layui-input upload">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.link_address}</label>
                    <div class="layui-input-block">
                        <input type="url" name="slide_url_2" value="{$row.slide_url_2}" placeholder=""
                            autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.carousel} 3</label>
                    <div class="layui-input-inline">
                        <input type="url" name="slide_image_3" value="{$row.slide_image_3}" placeholder=""
                            autocomplete="off" class="layui-input upload">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.link_address}</label>
                    <div class="layui-input-block">
                        <input type="url" name="slide_url_3" value="{$row.slide_url_3}" placeholder=""
                            autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.carousel} 4</label>
                    <div class="layui-input-inline">
                        <input type="url" name="slide_image_4" value="{$row.slide_image_4}" placeholder=""
                            autocomplete="off" class="layui-input upload">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.link_address}</label>
                    <div class="layui-input-block">
                        <input type="url" name="slide_url_4" value="{$row.slide_url_4}" placeholder=""
                            autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.carousel} 5</label>
                    <div class="layui-input-inline">
                        <input type="url" name="slide_image_5" value="{$row.slide_image_5}" placeholder=""
                            autocomplete="off" class="layui-input upload">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.link_address}</label>
                    <div class="layui-input-block">
                        <input type="url" name="slide_url_5" value="{$row.slide_url_5}" placeholder=""
                            autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
            <!-- 其它设置 -->
            <div class="layui-tab-item">
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.hot_article}</label>
                    <div class="layui-input-inline">
                        <input type="number" name="hot_num" value="{$row.hot_num}" required lay-verify="required"
                            placeholder="{$tran.input_num}" autocomplete="off" class="layui-input">
                    </div>
                    <div class="layui-form-mid layui-word-aux">{$tran.bar_show}</div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.home_comment}</label>
                    <div class="layui-input-inline">
                        <input type="number" name="comm_num" value="{$row.comm_num}" required lay-verify="required"
                            placeholder="{$tran.input_num}" autocomplete="off" class="layui-input">
                    </div>
                    <div class="layui-form-mid layui-word-aux">{$tran.bar_show}</div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.content_related}</label>
                    <div class="layui-input-inline">
                        <input type="number" name="related_num" value="{$row.related_num}" required
                            lay-verify="required" placeholder="{$tran.input_num}" autocomplete="off"
                            class="layui-input">
                    </div>
                    <div class="layui-form-mid layui-word-aux">{$tran.bar_show}</div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.picture_per_page}</label>
                    <div class="layui-input-inline">
                        <input type="number" name="page_num" value="{$row.page_num}" required lay-verify="required"
                            placeholder="{$tran.input_num}" autocomplete="off" class="layui-input">
                    </div>
                    <div class="layui-form-mid layui-word-aux">{$tran.bar_show}</div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.friend_link}</label>
                    <div class="layui-input-inline">
                        <input type="number" name="link_num" value="{$row.link_num}" required lay-verify="required"
                            placeholder="{$tran.input_num}" autocomplete="off" class="layui-input">
                    </div>
                    <div class="layui-form-mid layui-word-aux">{$tran.bar_show}</div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.voice_reader}</label>
                    <div class="layui-input-block">
                        <input type="hidden" name="voice_read" value="0">
                        <input type="checkbox" name="voice_read" value="1" {if $row.voice_read=='1' } checked{/if}
                            lay-skin="switch" lay-text="ON|OFF">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.comment_login}</label>
                    <div class="layui-input-block">
                        <input type="hidden" name="can_comment" value="0">
                        <input type="checkbox" name="can_comment" value="1" {if $row.can_comment=='1' } checked{/if}
                            lay-skin="switch" lay-text="ON|OFF">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.comment_pending}</label>
                    <div class="layui-input-block">
                        <input type="hidden" name="pending_comment" value="0">
                        <input type="checkbox" name="pending_comment" value="1" {if $row.pending_comment=='1' } checked{/if}
                            lay-skin="switch" lay-text="ON|OFF">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">SMTP {$tran.mail}</label>
                    <div class="layui-input-inline">
                        <select name="service">
                            <option value="" {if $row['service'] == ''} selected{/if}>{$tran.service}</option>
                            <option value="qq" {if $row['service'] == 'qq'} selected{/if}>smtp.qq.com</option>
                            <option value="gmail" {if $row['service'] == 'gmail'} selected{/if}>smtp.gmail.com</option>
                            <option value="163" {if $row['service'] == '163'} selected{/if}>smtp.163.com</option>
                            <option value="126" {if $row['service'] == '126'} selected{/if}>smtp.126.com</option>
                            <option value="yeah" {if $row['service'] == 'yeah'} selected{/if}>smtp.yeah.net</option>
                            <option value="outlook" {if $row['service'] == 'outlook'} selected{/if}>smtp.office365.com</option>
                            <option value="hotmail" {if $row['service'] == 'hotmail'} selected{/if}>smtp.live.com</option>
                            <option value="aliyun" {if $row['service'] == 'aliyun'} selected{/if}>smtp.aliyun.com</option>
                            <option value="sina" {if $row['service'] == 'sina'} selected{/if}>smtp.sina.com</option>
                            <option value="sohu" {if $row['service'] == 'sohu'} selected{/if}>smtp.sohu.com</option>
                            <option value="zoho" {if $row['service'] == 'zoho'} selected{/if}>smtp.zoho.com</option>
                            <option value="yandex" {if $row['service'] == 'yandex'} selected{/if}>smtp.yandex.com</option>
                            <option value="mailru" {if $row['service'] == 'mailru'} selected{/if}>smtp.mail.ru</option>
                        </select>
                    </div>
                    <div class="layui-input-inline">
                        <input type="email" name="email" value="{$row.email}" placeholder="{$tran.email_address}" autocomplete="off"
                            class="layui-input">
                    </div>
                    <div class="layui-input-inline">
                        <input type="text" name="code" value="{$row.code}" placeholder="{$tran.code}" autocomplete="off"
                            class="layui-input">
                    </div>
                    <div class="layui-form-mid" style="padding: 0 !important;">
                        <button type="button" class="layui-btn layui-btn-primary" lay-on="test">{$tran.send_test_mail}</button>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.static_address}</label>
                    <div class="layui-input-inline">
                        <input type="url" name="static" value="{$row.static}" placeholder="{$tran.optional}"
                            autocomplete="off" class="layui-input">
                    </div>
                    <div class="layui-form-mid layui-word-aux">/static/... *.(gif|jpg|jpeg|png|webp|svg|css|js)</div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">{$tran.greagedate}</label>
                    <div class="layui-input-inline">
                        <input type="text" name="date" value="{$row.date}" placeholder="{$tran.optional}"
                            autocomplete="off" class="layui-input date">
                    </div>
                    <div class="layui-form-mid">{$tran.use_address}</div>
                    <div class="layui-input-inline">
                        <input type="url" name="site" value="{$row.site}" placeholder="{$tran.optional}"
                            autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="button" class="layui-btn" lay-submit="" lay-filter="submit">{$tran.save}</button>
            <button type="reset" class="layui-btn layui-btn-primary">{$tran.reset}</button>
        </div>
    </div>
</form>

<script>
    layui.use(['util', 'layer', 'jquery'], function () {
        var util = layui.util,
            layer = layui.layer,
            $ = layui.jquery;

        util.event('lay-on', {
            test: function(othis) {
                layer.open({
                    type: 2,
                    maxmin: true,
                    title: '{$tran.test_mail}',
                    shadeClose: true,
                    shade: 0.3,
                    area: [Math.max($(window).width() * 0.618, Math.min($(window).width() - 20, Math.max($(window).width() * 0.618, 480))) + 'px', Math.min($(window).height() - 20, Math.max($(window).height() * 0.809, 450)) + 'px'],
                    content: "{$site_url}/{$lang}/admin/sendmail.html?send_type=test",
                });
            }
        });
    });
</script>

{include file='admin/inc/form.html'}

{include file='admin/footer.html'}